package com.example.zqh.pojo.contants;

/**
 * @Author: zqh
 * @Date: 2022-09-14-18:39
 * @Description: food表上传es的格式$
 */
public class ElasticSearchFood {

    public static final String MAPPING_FOOD = "{\n" +
            "   \"settings\": {\n" +
            "    \"analysis\": {\n" +
            "      \"analyzer\": {\n" +
            "        \"text_anlyzer\":{\n" +
            "        \"tokenizer\":\"ik_max_word\",\n" +
            "        \"filter\":\"py\"\n" +
            "      },\n" +
            "      \"completion_analyzer\":{\n" +
            "        \"tokenizer\":\"keyword\",\n" +
            "        \"filter\":\"py\"\n" +
            "      }\n" +
            "    },\n" +
            "   \"filter\":{\n" +
            "     \"py\":{\n" +
            "       \"type\":\"pinyin\",\n" +
            "       \"keep_full_pinyin\":false,\n" +
            "       \"keep_joined_full_pinyin\":true,\n" +
            "       \"keep_original\":true,\n" +
            "       \"limit_first_letter_length\":16,\n" +
            "       \"remove_duplicated_term\":true,\n" +
            "       \"none_chinese_pinyin_tokenize\":false\n" +
            "     }\n" +
            "   }\n" +
            "  }\n" +
            "  },\n" +
            "  \"mappings\": {\n" +
            "    \"properties\": {\n" +
            "    \n" +
            "      \"id\":{\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"name\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\",\n" +
            "        \"copy_to\": \"all\"\n" +
            "      },\n" +
            "      \"ingredientList\":{\n" +
            "        \"type\": \"text\"\n" +
            "      },\n" +
            "      \"price\":{\n" +
            "        \"type\": \"double\"\n" +
            "      },\n" +
            "      \"foodDesc\":{\n" +
            "        \"type\": \"text\"\n" +
            "      },\n" +
            "      \"benefit\":{\n" +
            "        \"type\": \"text\"\n" +
            "      },\n" +
            "      \"pic\":{\n" +
            "        \"type\": \"text\"\n" +
            "      },\n" +
            "      \"shopId\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"foodType\":{\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"all\":{\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"text_anlyzer\",\n" +
            "        \"search_analyzer\": \"ik_smart\"\n" +
            "      },\n" +
            "      \"suggestion\":{\n" +
            "        \"type\": \"completion\",\n" +
            "        \"analyzer\": \"completion_analyzer\"\n" +
            "      }\n" +
            "      \n" +
            "    }\n" +
            "  }\n" +
            "}";
}
